minios: Fix netfront for ia64.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 6 Feb 2007 23:12:59 +0000 (23:12 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 6 Feb 2007 23:12:59 +0000 (23:12 +0000)
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
extras/mini-os/gnttab.c
extras/mini-os/netfront.c

index da92fc33c9fa3b551aab771ba622b6b3f847e2d0..4d75897a98ab800ea9f4e5f122ce1350d2747305 100644 (file)
 
 #define NR_RESERVED_ENTRIES 8
 
+/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
+#ifdef __ia64__
+#define NR_GRANT_FRAMES 1
+#else
 #define NR_GRANT_FRAMES 4
+#endif
 #define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
 
 static grant_entry_t *gnttab_table;
index 4c10dc8770d2b3fa9db106d1439e75594fbed4c0..088f67a3bbb13db5cb8c0698d84a5bdbcc25e962 100644 (file)
@@ -349,7 +349,9 @@ done:
     init_rx_buffers();
 
     unsigned char rawmac[6];
-    sscanf(mac,"%x:%x:%x:%x:%x:%x",
+        /* Special conversion specifier 'hh' needed for __ia64__. Without
+           this mini-os panics with 'Unaligned reference'. */
+    sscanf(mac,"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
             &rawmac[0],
             &rawmac[1],
             &rawmac[2],